<template>

  <!-- 标题栏 -->
  <div style="height: 100%;background:#fff;">
    <popup :value="true"
           height="100%"
           :should-rerender-on-show="true"
           :show-mask="false"
           :hide-on-blur="false"
           :popup-style="{'z-index':1000}">
      <popup-header right-text="X"
                    title="体检数据详情"
                    :show-bottom-border="false"
                    @on-click-right="$router.go(-1)"></popup-header>
      <!-- 列表 -->
      <div style="height:calc(100% - 44px);overflow:auto">
        <accordion v-for="(demo,index) in list"
                   :key="index"
                   :title="demo.name"
                   :list="demo.child">

        </accordion>
        <div class="result ">
          结论
        </div>
        <div v-html="text"
             class="text ">

        </div>
      </div>
    </popup>
  </div>
</template>
<script>
export default {
  name: "person",
  mounted () {
    this.getData()
  },
  data () {
    return {
      img: '',
      text: '',
      list: [],
      text: '',
    }
  },
  methods: {
    getData () {
      this.$http({
        method: 'post',
        url: this.getReqUrl(this.WXAPI_URL, "ac=data&action=health&type=detail&user_no=" + this.user.USER_NO + "&id=" + this.row.hyear),
        data: {

        }
      }).then((res) => {
        let info1 = { name: '综合项目', child: res.data.data }
        this.list.push(info1)
        let info2 = { name: '血常规', child: res.data.data1 }
        this.list.push(info2)
        let info3 = { name: '尿常规', child: res.data.data2 }
        this.list.push(info3)
        this.text = res.data.data5.text || ''

      })
    },
  },
  computed: {
    user () {
      return this.$store.state.user
    },
    row () {
      return this.$store.state.currentRow
    }
  },
  watch: {

  }
}
</script>

<style>
.text {
  background: hsl(0, 100%, 100%);
}
.result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  height: 50px;
  line-height: 50px;
  font-size: 16px;
  background: hsl(0, 100%, 100%);
  text-indent: 1em;
  cursor: pointer;
  border-bottom: 1px solid #aaa;
}
.arrow-right {
  width: 2rem;
  height: 3rem;
}
</style>

